home *** CD-ROM | disk | FTP | other *** search
/ Aminet 30 / Aminet 30 (1999)(Schatztruhe)[!][Apr 1999].iso / Aminet / biz / haage / WarpUP_V31.lha / WarpUP-WarpOS / include / powerpc / tasksPPC.i < prev   
Text File  |  1998-03-27  |  5KB  |  145 lines

  1.         IFND POWERPC_TASKSPPC_I
  2. POWERPC_TASKSPPC_I      SET 1
  3. **
  4. **      $VER: tasksPPC.i 14.1 (27.3.98)
  5. **
  6. **      structures related to WarpOS task handling
  7. **
  8.  
  9.         IFND    EXEC_TYPES_I
  10.         include exec/types.i
  11.         ENDC
  12.  
  13.         IFND    EXEC_NODES_I
  14.         include exec/nodes.i
  15.         ENDC
  16.  
  17.         IFND    EXEC_TASKS_I
  18.         include exec/tasks.i
  19.         ENDC
  20.  
  21.         IFND    UTILITY_TAGITEM_I
  22.         include utility/tagitem.i
  23.         ENDC
  24.  
  25.         IFND    POWERPCLIB_V7           ;only for V8+
  26.  
  27. **** private structure used in the main task structure
  28.  
  29.     STRUCTURE       TASKLINK,MLN_SIZE
  30.     APTR            TASKLINK_TASK
  31.     ULONG           TASKLINK_SIG
  32.     UWORD           TASKLINK_USED
  33.     LABEL           TASKLINK_SIZE
  34.  
  35. ****  task structure PPC
  36.  
  37.     STRUCTURE       TASKPPC,TC_SIZE
  38.     ULONG           TASKPPC_STACKSIZE       ;read only
  39.     APTR            TASKPPC_STACKMEM        ;private
  40.     APTR            TASKPPC_CONTEXTMEM      ;private
  41.     APTR            TASKPPC_TASKPTR         ;private
  42.     ULONG           TASKPPC_FLAGS           ;read only
  43.     STRUCT          TASKPPC_LINK,TASKLINK_SIZE ;private
  44.     APTR            TASKPPC_BATSTORAGE      ;private
  45.     ULONG           TASKPPC_CORE            ;private
  46.     STRUCT          TASKPPC_TABLELINK,MLN_SIZE ;private
  47.     APTR            TASKPPC_TABLE           ;read only
  48.     ULONG           TASKPPC_DEBUGDATA       ;free space for debugger
  49.  
  50.     UWORD           TASKPPC_PAD
  51.     ULONG           TASKPPC_TIMESTAMP       ;private
  52.     ULONG           TASKPPC_TIMESTAMP2      ;   "
  53.     ULONG           TASKPPC_ELAPSED         ;   "
  54.     ULONG           TASKPPC_ELAPSED2        ;   "
  55.     ULONG           TASKPPC_TOTALELAPSED    ;   "
  56.     ULONG           TASKPPC_QUANTUM         ;   "
  57.     ULONG           TASKPPC_PRIORITY        ;   "
  58.     ULONG           TASKPPC_PRIOFFSET       ;   "
  59.     APTR            TASKPPC_POWERPCBASE     ;   "
  60.     ULONG           TASKPPC_DESIRED         ;   "
  61.     ULONG           TASKPPC_CPUUSAGE        ;cpu usage (x100) (read only)
  62.     ULONG           TASKPPC_BUSY            ;task busy time (x100) (read only)
  63.     ULONG           TASKPPC_ACTIVITY        ;task activity (x100) (read only)
  64.     ULONG           TASKPPC_ID              ;task ID (read only)
  65.     ULONG           TASKPPC_NICE            ;NICE value (read only)
  66.  
  67.     LABEL           TASKPPC_SIZE            ;don't depend on this size
  68.  
  69. ****  LN_TYPE field for PPC tasks
  70. NT_PPCTASK      =       100
  71.  
  72. ****  tc_state (one additional task state)
  73.  
  74. TS_CHANGING     =       7                       ;task is soon changing from
  75.                         ;running to waiting state
  76.  
  77. ****  taskppc_flags
  78.  
  79.     BITDEF          TASKPPC,SYSTEM,0        ;it's a system task
  80.     BITDEF          TASKPPC,BAT,1           ;the task runs under BAT setup
  81.     BITDEF          TASKPPC,THROW,2         ;cause exception
  82.  
  83. ****  special signal definitions
  84.  
  85.     BITDEF          SIG,TIME,10             ;internal
  86.  
  87. **** tags passed to CreateTaskPPC
  88.  
  89.     ENUM            TAG_USER+$100000
  90.     EITEM           TASKATTR_CODE           ;entry code
  91.     EITEM           TASKATTR_EXITCODE       ;exit code
  92.     EITEM           TASKATTR_NAME           ;task name
  93.     EITEM           TASKATTR_PRI            ;task priority
  94.     EITEM           TASKATTR_STACKSIZE      ;task stacksize
  95.     EITEM           TASKATTR_R2             ;smalldata/TOC base
  96.     EITEM           TASKATTR_R3             ;first parameter
  97.     EITEM           TASKATTR_R4
  98.     EITEM           TASKATTR_R5
  99.     EITEM           TASKATTR_R6
  100.     EITEM           TASKATTR_R7
  101.     EITEM           TASKATTR_R8
  102.     EITEM           TASKATTR_R9
  103.     EITEM           TASKATTR_R10            ;last parameter
  104.     EITEM           TASKATTR_SYSTEM         ;private
  105.     EITEM           TASKATTR_MOTHERPRI      ;inherit mother's pri (boolean)
  106.     EITEM           TASKATTR_BAT            ;BAT MMU setup (boolean)
  107.     EITEM           TASKATTR_PRIVATE
  108.     EITEM           TASKATTR_NICE           ;NICE value (V14+)
  109.  
  110. ****  taskptr structure (returned by LockTaskList)
  111.  
  112.     STRUCTURE       TASKPTR,LN_SIZE
  113.     APTR            TASKPTR_TASK            ;ptr to task
  114.     LABEL           TASKPTR_SIZE
  115.  
  116. **** return values of ChangeStack
  117.  
  118. CHSTACK_SUCCESS         =       -1
  119. CHSTACK_NOMEM           =       0
  120.  
  121. **** input parameter of ChangeMMU
  122.  
  123. CHMMU_STANDARD          =       1               ;standard paged MMU setup
  124. CHMMU_BAT               =       2               ;BAT MMU setup
  125.  
  126. **** tags passed to SnoopTask
  127.  
  128.     ENUM            TAG_USER+$103000
  129.     EITEM           SNOOP_CODE              ;-> callback function
  130.     EITEM           SNOOP_DATA              ;custom data
  131.     EITEM           SNOOP_TYPE              ;entry or exit code
  132.  
  133. **** possible types for SNOOP_TYPE
  134. SNOOP_START     =       1                       ;monitor task start
  135. SNOOP_EXIT      =       2                       ;monitor task end
  136.  
  137. **** possible values for the CreatorCPU parameter of the callback function
  138.  
  139. CREATOR_PPC     =       1
  140. CREATOR_68K     =       2
  141.  
  142.         ENDC    ;POWERPCLIB_V7
  143.  
  144.     ENDC    ;TASKSPPC_I
  145.